<?php
/**
 * @package pmapi
 * @copyright Copyright (c)2014 Enrico Fagnoni
 * @license GNU General Public License version 3, or later
 *
 * @since 1.0.0
 */
 
defined('_JEXEC') or die;

if (!class_exists('LinkedDataView')) require(JPATH_COMPONENT.DS.'views'.DS.'linkeddata.php');

class PmapiViewManufacturer extends LinkedDataView
{
    protected 
        $manufacturer = null,
        $show_images = array();
    
        
    protected function _computeETag()
    {
        return md5(serialize($this->manufacturer));
    }    


    public function GET_RequestProcessor($tpl = null) 
    {
        $this->manufacturer = $this->get('Item');        
        $this->show_images = ApiHelper::filterAndRebaseImages('manufacturer',$this->manufacturer->images);

        return parent::GET_RequestProcessor($tpl);
    }
        
}

